//
//  PickerViewViewController.m
//  PickerView
//

#import "PickerViewViewController.h"

@implementation PickerViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	CGRect pickerFrame = CGRectMake(0, 120, 0, 0);
	UIPickerView *myPicker = [[UIPickerView alloc]
							  initWithFrame:pickerFrame];
	myPicker.dataSource = self;
	myPicker.delegate = self;
	myPicker.showsSelectionIndicator = YES;
	
	[self.view addSubview:myPicker];
	
	[myPicker release];
}

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
	return 1;
}

- (NSInteger)pickerView:(UIPickerView *)pickerView
numberOfRowsInComponent:(NSInteger)component {
	return 10;
}

- (NSString *)pickerView:(UIPickerView *)pickerView
			 titleForRow:(NSInteger)row
			forComponent:(NSInteger)component {
	return [NSString stringWithFormat:@"Row %i", row];
}

- (void)dealloc {
    [super dealloc];
}

@end
